#include "plain_printer.h"
#include "printer.h"
#include <stdio.h>

int plain_printer_print(struct plain_printer *self, const char *msg);

struct printer_i plain_printer_interface = {
        .print = (printer_print_func_t)plain_printer_print
};

int plain_print_initialize(struct plain_printer *self){
        if(self == NULL)
                return -1;
        self->interface = &plain_printer_interface;
        self->prifix = ">>> ";
        return 0;
}

int plain_printer_print(struct plain_printer *self, const char *msg){
        if(self == NULL)
                return -1;
        printf("%s%s\n", self->prifix, msg);
        return 0;
}
